package com.idealighter.game.core.dao.generate.mapper;

import com.idealighter.game.core.dao.generate.domain.PlayerVipDomain;
import com.idealighter.game.core.dao.generate.domain.PlayerVipDomainExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectKey;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface PlayerVipDomainMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_vip
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @SelectProvider(type=PlayerVipDomainSqlProvider.class, method="countByExample")
    long countByExample(PlayerVipDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_vip
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @DeleteProvider(type=PlayerVipDomainSqlProvider.class, method="deleteByExample")
    int deleteByExample(PlayerVipDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_vip
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Delete({
        "delete from player_vip",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_vip
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Insert({
        "insert into player_vip (player_id, play_item_effect, ",
        "table_limit_gold, table_limit_gold_abled, ",
        "table_limit_ip, table_pwd, ",
        "table_pwd_abled, room_setting_abled)",
        "values (#{playerId,jdbcType=BIGINT}, #{playItemEffect,jdbcType=BIT}, ",
        "#{tableLimitGold,jdbcType=BIGINT}, #{tableLimitGoldAbled,jdbcType=BIT}, ",
        "#{tableLimitIp,jdbcType=BIT}, #{tablePwd,jdbcType=VARCHAR}, ",
        "#{tablePwdAbled,jdbcType=BIT}, #{roomSettingAbled,jdbcType=BIT})"
    })
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Integer.class)
    int insert(PlayerVipDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_vip
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @InsertProvider(type=PlayerVipDomainSqlProvider.class, method="insertSelective")
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Integer.class)
    int insertSelective(PlayerVipDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_vip
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @SelectProvider(type=PlayerVipDomainSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="player_id", property="playerId", jdbcType=JdbcType.BIGINT),
        @Result(column="play_item_effect", property="playItemEffect", jdbcType=JdbcType.BIT),
        @Result(column="table_limit_gold", property="tableLimitGold", jdbcType=JdbcType.BIGINT),
        @Result(column="table_limit_gold_abled", property="tableLimitGoldAbled", jdbcType=JdbcType.BIT),
        @Result(column="table_limit_ip", property="tableLimitIp", jdbcType=JdbcType.BIT),
        @Result(column="table_pwd", property="tablePwd", jdbcType=JdbcType.VARCHAR),
        @Result(column="table_pwd_abled", property="tablePwdAbled", jdbcType=JdbcType.BIT),
        @Result(column="room_setting_abled", property="roomSettingAbled", jdbcType=JdbcType.BIT)
    })
    List<PlayerVipDomain> selectByExample(PlayerVipDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_vip
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Select({
        "select",
        "id, player_id, play_item_effect, table_limit_gold, table_limit_gold_abled, table_limit_ip, ",
        "table_pwd, table_pwd_abled, room_setting_abled",
        "from player_vip",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="player_id", property="playerId", jdbcType=JdbcType.BIGINT),
        @Result(column="play_item_effect", property="playItemEffect", jdbcType=JdbcType.BIT),
        @Result(column="table_limit_gold", property="tableLimitGold", jdbcType=JdbcType.BIGINT),
        @Result(column="table_limit_gold_abled", property="tableLimitGoldAbled", jdbcType=JdbcType.BIT),
        @Result(column="table_limit_ip", property="tableLimitIp", jdbcType=JdbcType.BIT),
        @Result(column="table_pwd", property="tablePwd", jdbcType=JdbcType.VARCHAR),
        @Result(column="table_pwd_abled", property="tablePwdAbled", jdbcType=JdbcType.BIT),
        @Result(column="room_setting_abled", property="roomSettingAbled", jdbcType=JdbcType.BIT)
    })
    PlayerVipDomain selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_vip
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @UpdateProvider(type=PlayerVipDomainSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") PlayerVipDomain record, @Param("example") PlayerVipDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_vip
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @UpdateProvider(type=PlayerVipDomainSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") PlayerVipDomain record, @Param("example") PlayerVipDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_vip
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @UpdateProvider(type=PlayerVipDomainSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(PlayerVipDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table player_vip
     *
     * @mbg.generated Tue Aug 14 14:13:21 CST 2018
     */
    @Update({
        "update player_vip",
        "set player_id = #{playerId,jdbcType=BIGINT},",
          "play_item_effect = #{playItemEffect,jdbcType=BIT},",
          "table_limit_gold = #{tableLimitGold,jdbcType=BIGINT},",
          "table_limit_gold_abled = #{tableLimitGoldAbled,jdbcType=BIT},",
          "table_limit_ip = #{tableLimitIp,jdbcType=BIT},",
          "table_pwd = #{tablePwd,jdbcType=VARCHAR},",
          "table_pwd_abled = #{tablePwdAbled,jdbcType=BIT},",
          "room_setting_abled = #{roomSettingAbled,jdbcType=BIT}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(PlayerVipDomain record);
}